Optimal. Leaf size=230 \[ -\frac {3 d^3 e^{-4 e-4 f x}}{512 a^2 f^4}-\frac {3 d^3 e^{-2 e-2 f x}}{16 a^2 f^4}-\frac {3 d^2 e^{-4 e-4 f x} (c+d x)}{128 a^2 f^3}-\frac {3 d^2 e^{-2 e-2 f x} (c+d x)}{8 a^2 f^3}-\frac {3 d e^{-4 e-4 f x} (c+d x)^2}{64 a^2 f^2}-\frac {3 d e^{-2 e-2 f x} (c+d x)^2}{8 a^2 f^2}-\frac {e^{-4 e-4 f x} (c+d x)^3}{16 a^2 f}-\frac {e^{-2 e-2 f x} (c+d x)^3}{4 a^2 f}+\frac {(c+d x)^4}{16 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 230, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3810, 2207,
2225} \begin {gather*} -\frac {3 d^2 (c+d x) e^{-4 e-4 f x}}{128 a^2 f^3}-\frac {3 d^2 (c+d x) e^{-2 e-2 f x}}{8 a^2 f^3}-\frac {3 d (c+d x)^2 e^{-4 e-4 f x}}{64 a^2 f^2}-\frac {3 d (c+d x)^2 e^{-2 e-2 f x}}{8 a^2 f^2}-\frac {(c+d x)^3 e^{-4 e-4 f x}}{16 a^2 f}-\frac {(c+d x)^3 e^{-2 e-2 f x}}{4 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}-\frac {3 d^3 e^{-4 e-4 f x}}{512 a^2 f^4}-\frac {3 d^3 e^{-2 e-2 f x}}{16 a^2 f^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2207
Rule 2225
Rule 3810
Rubi steps
\begin {align*} \int \frac {(c+d x)^3}{(a+a \tanh (e+f x))^2} \, dx &=\int \left (\frac {(c+d x)^3}{4 a^2}+\frac {e^{-4 e-4 f x} (c+d x)^3}{4 a^2}+\frac {e^{-2 e-2 f x} (c+d x)^3}{2 a^2}\right ) \, dx\\ &=\frac {(c+d x)^4}{16 a^2 d}+\frac {\int e^{-4 e-4 f x} (c+d x)^3 \, dx}{4 a^2}+\frac {\int e^{-2 e-2 f x} (c+d x)^3 \, dx}{2 a^2}\\ &=-\frac {e^{-4 e-4 f x} (c+d x)^3}{16 a^2 f}-\frac {e^{-2 e-2 f x} (c+d x)^3}{4 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}+\frac {(3 d) \int e^{-4 e-4 f x} (c+d x)^2 \, dx}{16 a^2 f}+\frac {(3 d) \int e^{-2 e-2 f x} (c+d x)^2 \, dx}{4 a^2 f}\\ &=-\frac {3 d e^{-4 e-4 f x} (c+d x)^2}{64 a^2 f^2}-\frac {3 d e^{-2 e-2 f x} (c+d x)^2}{8 a^2 f^2}-\frac {e^{-4 e-4 f x} (c+d x)^3}{16 a^2 f}-\frac {e^{-2 e-2 f x} (c+d x)^3}{4 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}+\frac {\left (3 d^2\right ) \int e^{-4 e-4 f x} (c+d x) \, dx}{32 a^2 f^2}+\frac {\left (3 d^2\right ) \int e^{-2 e-2 f x} (c+d x) \, dx}{4 a^2 f^2}\\ &=-\frac {3 d^2 e^{-4 e-4 f x} (c+d x)}{128 a^2 f^3}-\frac {3 d^2 e^{-2 e-2 f x} (c+d x)}{8 a^2 f^3}-\frac {3 d e^{-4 e-4 f x} (c+d x)^2}{64 a^2 f^2}-\frac {3 d e^{-2 e-2 f x} (c+d x)^2}{8 a^2 f^2}-\frac {e^{-4 e-4 f x} (c+d x)^3}{16 a^2 f}-\frac {e^{-2 e-2 f x} (c+d x)^3}{4 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}+\frac {\left (3 d^3\right ) \int e^{-4 e-4 f x} \, dx}{128 a^2 f^3}+\frac {\left (3 d^3\right ) \int e^{-2 e-2 f x} \, dx}{8 a^2 f^3}\\ &=-\frac {3 d^3 e^{-4 e-4 f x}}{512 a^2 f^4}-\frac {3 d^3 e^{-2 e-2 f x}}{16 a^2 f^4}-\frac {3 d^2 e^{-4 e-4 f x} (c+d x)}{128 a^2 f^3}-\frac {3 d^2 e^{-2 e-2 f x} (c+d x)}{8 a^2 f^3}-\frac {3 d e^{-4 e-4 f x} (c+d x)^2}{64 a^2 f^2}-\frac {3 d e^{-2 e-2 f x} (c+d x)^2}{8 a^2 f^2}-\frac {e^{-4 e-4 f x} (c+d x)^3}{16 a^2 f}-\frac {e^{-2 e-2 f x} (c+d x)^3}{4 a^2 f}+\frac {(c+d x)^4}{16 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.53, size = 420, normalized size = 1.83 \begin {gather*} \frac {\text {sech}^2(e+f x) (\cosh (f x)+\sinh (f x))^2 \left (-\left (\left (4 c^3 f^3+6 c^2 d f^2 (1+2 f x)+6 c d^2 f \left (1+2 f x+2 f^2 x^2\right )+d^3 \left (3+6 f x+6 f^2 x^2+4 f^3 x^3\right )\right ) \cosh (2 f x)\right )+\frac {1}{32} \left (32 c^3 f^3+24 c^2 d f^2 (1+4 f x)+12 c d^2 f \left (1+4 f x+8 f^2 x^2\right )+d^3 \left (3+12 f x+24 f^2 x^2+32 f^3 x^3\right )\right ) \cosh (4 f x) (-\cosh (2 e)+\sinh (2 e))+f^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right ) (\cosh (2 e)+\sinh (2 e))+\left (4 c^3 f^3+6 c^2 d f^2 (1+2 f x)+6 c d^2 f \left (1+2 f x+2 f^2 x^2\right )+d^3 \left (3+6 f x+6 f^2 x^2+4 f^3 x^3\right )\right ) \sinh (2 f x)+\frac {1}{32} \left (32 c^3 f^3+24 c^2 d f^2 (1+4 f x)+12 c d^2 f \left (1+4 f x+8 f^2 x^2\right )+d^3 \left (3+12 f x+24 f^2 x^2+32 f^3 x^3\right )\right ) (\cosh (2 e)-\sinh (2 e)) \sinh (4 f x)\right )}{16 a^2 f^4 (1+\tanh (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.63, size = 273, normalized size = 1.19
method | result | size |
risch | \(\frac {d^{3} x^{4}}{16 a^{2}}+\frac {d^{2} c \,x^{3}}{4 a^{2}}+\frac {3 d \,c^{2} x^{2}}{8 a^{2}}+\frac {c^{3} x}{4 a^{2}}+\frac {c^{4}}{16 a^{2} d}-\frac {\left (4 d^{3} x^{3} f^{3}+12 c \,d^{2} f^{3} x^{2}+12 c^{2} d \,f^{3} x +6 d^{3} f^{2} x^{2}+4 c^{3} f^{3}+12 c \,d^{2} f^{2} x +6 c^{2} d \,f^{2}+6 d^{3} f x +6 c \,d^{2} f +3 d^{3}\right ) {\mathrm e}^{-2 f x -2 e}}{16 a^{2} f^{4}}-\frac {\left (32 d^{3} x^{3} f^{3}+96 c \,d^{2} f^{3} x^{2}+96 c^{2} d \,f^{3} x +24 d^{3} f^{2} x^{2}+32 c^{3} f^{3}+48 c \,d^{2} f^{2} x +24 c^{2} d \,f^{2}+12 d^{3} f x +12 c \,d^{2} f +3 d^{3}\right ) {\mathrm e}^{-4 f x -4 e}}{512 a^{2} f^{4}}\) | \(273\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 314, normalized size = 1.37 \begin {gather*} \frac {1}{16} \, c^{3} {\left (\frac {4 \, {\left (f x + e\right )}}{a^{2} f} - \frac {4 \, e^{\left (-2 \, f x - 2 \, e\right )} + e^{\left (-4 \, f x - 4 \, e\right )}}{a^{2} f}\right )} + \frac {3 \, {\left (8 \, f^{2} x^{2} e^{\left (4 \, e\right )} - 8 \, {\left (2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (-2 \, f x\right )} - {\left (4 \, f x + 1\right )} e^{\left (-4 \, f x\right )}\right )} c^{2} d e^{\left (-4 \, e\right )}}{64 \, a^{2} f^{2}} + \frac {{\left (32 \, f^{3} x^{3} e^{\left (4 \, e\right )} - 48 \, {\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} + 2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (-2 \, f x\right )} - 3 \, {\left (8 \, f^{2} x^{2} + 4 \, f x + 1\right )} e^{\left (-4 \, f x\right )}\right )} c d^{2} e^{\left (-4 \, e\right )}}{128 \, a^{2} f^{3}} + \frac {{\left (32 \, f^{4} x^{4} e^{\left (4 \, e\right )} - 32 \, {\left (4 \, f^{3} x^{3} e^{\left (2 \, e\right )} + 6 \, f^{2} x^{2} e^{\left (2 \, e\right )} + 6 \, f x e^{\left (2 \, e\right )} + 3 \, e^{\left (2 \, e\right )}\right )} e^{\left (-2 \, f x\right )} - {\left (32 \, f^{3} x^{3} + 24 \, f^{2} x^{2} + 12 \, f x + 3\right )} e^{\left (-4 \, f x\right )}\right )} d^{3} e^{\left (-4 \, e\right )}}{512 \, a^{2} f^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 597 vs.
\(2 (212) = 424\).
time = 0.37, size = 597, normalized size = 2.60 \begin {gather*} -\frac {128 \, d^{3} f^{3} x^{3} + 128 \, c^{3} f^{3} + 192 \, c^{2} d f^{2} + 192 \, c d^{2} f + 96 \, d^{3} + 192 \, {\left (2 \, c d^{2} f^{3} + d^{3} f^{2}\right )} x^{2} - {\left (32 \, d^{3} f^{4} x^{4} - 32 \, c^{3} f^{3} - 24 \, c^{2} d f^{2} - 12 \, c d^{2} f + 32 \, {\left (4 \, c d^{2} f^{4} - d^{3} f^{3}\right )} x^{3} - 3 \, d^{3} + 24 \, {\left (8 \, c^{2} d f^{4} - 4 \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} + 4 \, {\left (32 \, c^{3} f^{4} - 24 \, c^{2} d f^{3} - 12 \, c d^{2} f^{2} - 3 \, d^{3} f\right )} x\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} - 2 \, {\left (32 \, d^{3} f^{4} x^{4} + 32 \, c^{3} f^{3} + 24 \, c^{2} d f^{2} + 12 \, c d^{2} f + 32 \, {\left (4 \, c d^{2} f^{4} + d^{3} f^{3}\right )} x^{3} + 3 \, d^{3} + 24 \, {\left (8 \, c^{2} d f^{4} + 4 \, c d^{2} f^{3} + d^{3} f^{2}\right )} x^{2} + 4 \, {\left (32 \, c^{3} f^{4} + 24 \, c^{2} d f^{3} + 12 \, c d^{2} f^{2} + 3 \, d^{3} f\right )} x\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) - {\left (32 \, d^{3} f^{4} x^{4} - 32 \, c^{3} f^{3} - 24 \, c^{2} d f^{2} - 12 \, c d^{2} f + 32 \, {\left (4 \, c d^{2} f^{4} - d^{3} f^{3}\right )} x^{3} - 3 \, d^{3} + 24 \, {\left (8 \, c^{2} d f^{4} - 4 \, c d^{2} f^{3} - d^{3} f^{2}\right )} x^{2} + 4 \, {\left (32 \, c^{3} f^{4} - 24 \, c^{2} d f^{3} - 12 \, c d^{2} f^{2} - 3 \, d^{3} f\right )} x\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} + 192 \, {\left (2 \, c^{2} d f^{3} + 2 \, c d^{2} f^{2} + d^{3} f\right )} x}{512 \, {\left (a^{2} f^{4} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} + 2 \, a^{2} f^{4} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) + a^{2} f^{4} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {c^{3}}{\tanh ^{2}{\left (e + f x \right )} + 2 \tanh {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} x^{3}}{\tanh ^{2}{\left (e + f x \right )} + 2 \tanh {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} x^{2}}{\tanh ^{2}{\left (e + f x \right )} + 2 \tanh {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d x}{\tanh ^{2}{\left (e + f x \right )} + 2 \tanh {\left (e + f x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 368, normalized size = 1.60 \begin {gather*} \frac {{\left (32 \, d^{3} f^{4} x^{4} e^{\left (4 \, f x + 4 \, e\right )} + 128 \, c d^{2} f^{4} x^{3} e^{\left (4 \, f x + 4 \, e\right )} + 192 \, c^{2} d f^{4} x^{2} e^{\left (4 \, f x + 4 \, e\right )} - 128 \, d^{3} f^{3} x^{3} e^{\left (2 \, f x + 2 \, e\right )} - 32 \, d^{3} f^{3} x^{3} + 128 \, c^{3} f^{4} x e^{\left (4 \, f x + 4 \, e\right )} - 384 \, c d^{2} f^{3} x^{2} e^{\left (2 \, f x + 2 \, e\right )} - 96 \, c d^{2} f^{3} x^{2} - 384 \, c^{2} d f^{3} x e^{\left (2 \, f x + 2 \, e\right )} - 192 \, d^{3} f^{2} x^{2} e^{\left (2 \, f x + 2 \, e\right )} - 96 \, c^{2} d f^{3} x - 24 \, d^{3} f^{2} x^{2} - 128 \, c^{3} f^{3} e^{\left (2 \, f x + 2 \, e\right )} - 384 \, c d^{2} f^{2} x e^{\left (2 \, f x + 2 \, e\right )} - 32 \, c^{3} f^{3} - 48 \, c d^{2} f^{2} x - 192 \, c^{2} d f^{2} e^{\left (2 \, f x + 2 \, e\right )} - 192 \, d^{3} f x e^{\left (2 \, f x + 2 \, e\right )} - 24 \, c^{2} d f^{2} - 12 \, d^{3} f x - 192 \, c d^{2} f e^{\left (2 \, f x + 2 \, e\right )} - 12 \, c d^{2} f - 96 \, d^{3} e^{\left (2 \, f x + 2 \, e\right )} - 3 \, d^{3}\right )} e^{\left (-4 \, f x - 4 \, e\right )}}{512 \, a^{2} f^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.25, size = 267, normalized size = 1.16 \begin {gather*} \frac {c^3\,x}{4\,a^2}-{\mathrm {e}}^{-4\,e-4\,f\,x}\,\left (\frac {32\,c^3\,f^3+24\,c^2\,d\,f^2+12\,c\,d^2\,f+3\,d^3}{512\,a^2\,f^4}+\frac {d^3\,x^3}{16\,a^2\,f}+\frac {3\,d\,x\,\left (8\,c^2\,f^2+4\,c\,d\,f+d^2\right )}{128\,a^2\,f^3}+\frac {3\,d^2\,x^2\,\left (d+4\,c\,f\right )}{64\,a^2\,f^2}\right )-{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (\frac {4\,c^3\,f^3+6\,c^2\,d\,f^2+6\,c\,d^2\,f+3\,d^3}{16\,a^2\,f^4}+\frac {d^3\,x^3}{4\,a^2\,f}+\frac {3\,d\,x\,\left (2\,c^2\,f^2+2\,c\,d\,f+d^2\right )}{8\,a^2\,f^3}+\frac {3\,d^2\,x^2\,\left (d+2\,c\,f\right )}{8\,a^2\,f^2}\right )+\frac {d^3\,x^4}{16\,a^2}+\frac {3\,c^2\,d\,x^2}{8\,a^2}+\frac {c\,d^2\,x^3}{4\,a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________